home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cdrtools-1.10 / lib / stdio / niread.c < prev   
Encoding:
C/C++ Source or Header  |  1996-02-04  |  1.0 KB  |  35 lines

  1. /* @(#)niread.c    1.5 96/02/04 Copyright 1986 J. Schilling */
  2. /*
  3.  *    Copyright (c) 1986 J. Schilling
  4.  */
  5. /* This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2, or (at your option)
  8.  * any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  * 
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; see the file COPYING.  If not, write to
  17.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  18.  */
  19.  
  20. #include <stdio.h>
  21. #include "io.h"
  22. #include <errno.h>
  23.  
  24. int _niread(f, buf, count)
  25.     int    f;
  26.     void    *buf;
  27.     int    count;
  28. {
  29.     int ret;
  30.  
  31.     while((ret = read(f, buf, count)) < 0 && errno == EINTR)
  32.         ;
  33.     return(ret);
  34. }
  35.